/*
 * $Id: SpecData.java 23 2002-09-29 13:59:30Z bpruessmann $
 * 
 * Copyright (c) 2001 Boris Pruessmann and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v0.5
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *    Boris Pruessmann - Initial implementation.
 */
package net.sourceforge.p4eclipse.core.api;

import java.util.Map;

/**
  * Wrapper class for Perforce API SpecData class.
  * 
  * @version	$Revision: 23 $
  * @author 	<a href="mailto:bpruessmann@users.sourceforge.net">Boris Pruessmann</a>
  */
public class SpecData
{
	/* DON'T TOUCH THE CONTENT OF THIS VARIABLE */
	private int _nativeHandle;

	/** Creates a new Client instance. */
	public SpecData()
	{
		construct();
	}
	
	/** @see Object#finalize() */
	public void finalize() 
		throws Throwable
	{
		super.finalize();
		destruct();
	}

	/*
	 * Called by the constructor to initialize the native side
	 * of this class.
	 */
	private native void construct();
	
	/*
	 * Called by finalize() to destroy the native side of this
	 * class.
	 */
	private native void destruct();	
	
	/**
	  * Returns the SpecData in form of a Map.
	  */
	public native Map getSpecDataMap();
	
	public native String get(String key);	
	
	/**
	  * Sets the SpecData in form of a Map.
	  */
	public native void replace(String key, String value);	
}
